/*
 * Sale.h
 *   This is the interface for the class Sale.
 *   Sale is a class for simple sales.
 *
 *  Created on: Mar 1, 2014
 *      Author: Anthony Varghese - This is from the Savitch book
 */

#ifndef SALE_H_
#define SALE_H_

namespace SavitchSale {

class Sale {
public:
    Sale( );
    Sale(double thePrice);
    double getPrice( ) const;
    void setPrice(double newPrice);
    virtual double bill( ) const;
    double savings(const Sale& other) const;
    //Returns the savings if you buy other instead of the calling object.
private:
    double price;
};

bool operator < (const Sale& first, const Sale& second);
//Compares two sales to see which is larger.

} /* namespace SavitchSale */

#endif /* SALE_H_ */
